<h1><?php echo $model->companyName; ?></h1>

<?php 
	$businessLabels = Business::model()->attributeLabels();
	$bModelLabels = BusinessModel::model()->attributeLabels();

$vp = "";
foreach ($model->business->tblValuepropositions as $value)
{
	$vp = $vp.$value->name."  ";
}

$bres = "";
foreach ($model->business->tblBusinessresources as $resource)
{
	$bres = $bres.$resource->name."  ";
}

$rs = "";
foreach ($model->businessModel->tblRevenuestreams as $rstreams)
{
	$rs = $rs.$rstreams->name."  ";
}

$p = "";
foreach ($model->businessModel->tblPartnership as $partners)
{
	$p = $p.$partners->name."  ";
}
	
$this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'productName',
		'companyName',
		'description',
		'details_customerSegment',
		'details_valueProposition',
		'details_revenueStreams',
		'details_businessResources',
		
         array(
                'label'=> $businessLabels['businessGoal'],
                'type'=>'raw',
                'value'=>$model->business->businessGoal,
          ),
          array(
                'label'=> $businessLabels['businessStatus'],
                'type'=>'raw',
                'value'=>$model->business->businessStatus,
          ),
         array(
                'label'=> $businessLabels['businessType_id'],
                'type'=>'raw',
                'value'=>$model->business->businessType_id,
          ),
          array(
                'label'=> $businessLabels['tblValuepropositions'],
                'type'=>'raw',
                'value'=>$vp,
          ),
          array(
                'label'=> $businessLabels['tblBusinessresources'],
                'type'=>'raw',
                'value'=>$bres,
          ),
          array(
                'label'=> 'EconomicSector',
                'type'=>'raw',
                'value'=>EconomicSector::model()->findByPk($model->business->economicSector_id)->name,
          ),
          array(
                'label'=> 'BusinessSector',
                'type'=>'raw',
                'value'=>BusinessSector::model()->findByPk($model->business->businessSector_id)->name,
          ),
          array(
                'label'=> 'industryGroup',
                'type'=>'raw',
                'value'=>IndustryGroup::model()->findByPk($model->business->industryGroup_id)->name,
          ),
          array(
                'label'=> $bModelLabels['revenueStreams'],
                'type'=>'raw',
                'value'=>$rs,
          ),
          array(
                'label'=> $bModelLabels['customerSegment'],
                'type'=>'raw',
                'value'=>$model->businessModel->customerSegment,
          ),
          array(
                'label'=> $bModelLabels['partnership'],
                'type'=>'raw',
                'value'=>$p,
          ),
          array(
                'label'=> $bModelLabels['scale'],
                'type'=>'raw',
                'value'=>$model->businessModel->scale,
          ),
          array(
                'label'=> $bModelLabels['focus'],
                'type'=>'raw',
                'value'=>$model->businessModel->focus,
          ),
	),
	
)); 

